IMAPStore gmail-remote
Host imap.gmail.com
Port 993
UserCmd "age -i ~/.ssh/id_ed25519 -d ~/cfg/secrets/google_user.age"
PassCmd "age -i ~/.ssh/id_ed25519 -d ~/cfg/secrets/msmtp_gmail.age"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

MaildirStore gmail-local
#Subfolders Verbatim
Path ~/.local/share/email/x1c/
INBOX ~/.local/share/email/x1c/INBOX
Flatten .

Channel gmail-default
Far :gmail-remote:
Near :gmail-local:
Create near
#Patterns INBOX Drafts Sent Trash Important
Patterns * ![Gmail]* !Drafts !Sent !Trash !Archive
Sync All
SyncState *
Create Near
Expunge Both
#MaxMessages 0

Channel gmail-drafts
Far :gmail-remote:"[Gmail]/Drafts"
Create Near
Near :gmail-local:Drafts
Sync All
Expunge Both
SyncState *

Channel gmail-sent
Far :gmail-remote:"[Gmail]/Sent Mail"
Create Near
Near :gmail-local:Sent
Sync All
Expunge Both
SyncState *

#Channel gmail-trash
#Far :gmail-remote:"[Gmail]/Trash"
#Create Near
#Near :gmail-local:Trash
#Sync All
#Expunge Both
#SyncState *

Channel gmail-spam
Far :gmail-remote:"[Gmail]/Spam"
Create Near
Near :gmail-local:Spam
Sync All
Expunge Both
SyncState *

Channel gmail-archive
Far :gmail-remote:"[Gmail]/All Mail"
Create Near
Near :gmail-local:Archive
Sync All
SyncState *

Group gmail
Channel gmail-default
Channel gmail-drafts
Channel gmail-sent
#Channel gmail-trash
Channel gmail-archive
Channel gmail-spam


# vim: ft=mbsyncrc
